#include <iostream>
using namespace std;

const int ONEFEN = 1;
const int TWOFEN = 2;
const int FIVEFEN = 5;
const int ONEJIAO = 10;

int main()
{
    cout << endl
         << "学号：3170608043，姓名：石英钰" << endl
         << endl;
    float yuan;
    cout << "Please input the change you need (unit: yuan): ";
    cin >> yuan;

    int x = 100 * yuan, onefen = 0, twofen = 0, fivefen = 0, onejiao = 0;
    int buffer = x;
    for (; buffer >= ONEJIAO;)
    {
        buffer -= ONEJIAO;
        onejiao++;
    }
    for (; buffer >= FIVEFEN;)
    {
        buffer -= FIVEFEN;
        fivefen++;
    }
    for (; buffer >= TWOFEN;)
    {
        buffer -= TWOFEN;
        twofen++;
    }
    for (; buffer >= ONEFEN;)
    {
        buffer -= ONEFEN;
        onefen++;
    }
    printf("onefen: %d, twofen: %d, fivefen: %d, onejiao: %d\n", onefen, twofen, fivefen, onejiao);
    return 0;
}